List getSubTypes(String firstType) {
  for (var element in experienceTypes) {
    if (firstType.contains("【${element["first_type"]}】")) {
      for (var element1 in element["children"]) {
        if (firstType.contains("【${element1["second_type"]}】")) {
          return element1["children"];
        }
      }
    }
  }
  return [];
}

List<Map> getAllTechSubTypes(String type) {
  for (var element in experienceTypes) {
    if (element["first_type"] == "技术") {
      for (var element1 in element["children"]) {
        if (element1["second_type"] == type) {
          return element1["children"];
        }
      }
    }
  }
  return [];
}

List<Map> getAlUnTechSubTypes(String type) {
  for (var element in experienceTypes) {
    if (element["first_type"] == "非技术") {
      for (var element1 in element["children"]) {
        if (element1["second_type"] == type) {
          return element1["children"];
        }
      }
    }
  }
  return [];
}

List<Map> getAllTechTypes() {
  for (var element in experienceTypes) {
    if (element["first_type"] == "技术") {
      return element["children"];
    }
  }
  return [];
}

List<Map> getAllUnTechTypes() {
  for (var element in experienceTypes) {
    if (element["first_type"] == "非技术") {
      return element["children"];
    }
  }
  return [];
}

String removeTypeName(String title) {
  // 移除可能存在的类别名称
  for (var element in experienceTypes) {
    title = title.replaceAll("【${element["first_type"]}】", "");
    for (var element1 in element["children"]) {
      title = title.replaceAll("【${element1["second_type"]}】", "");
      for (var element2 in element1["children"]) {
        title = title.replaceAll("【${element2["third_type"]}】", "");
      }
    }
  }
  return title;
}

List experienceTypes = [
  {
    "first_type": "技术",
    "count": 233,
    "children": [
      {
        "second_type": "前端",
        "count": 233,
        "children": [
          {"third_type": "浏览器", "count": 233},
          {"third_type": "HTML", "count": 233},
          {"third_type": "CSS", "count": 233},
          {"third_type": "JavaScript", "count": 233},
          {"third_type": "Webpack", "count": 233},
          {"third_type": "ES6", "count": 233},
          {"third_type": "React", "count": 233},
          {"third_type": "Vue3", "count": 233},
          {"third_type": "工程化", "count": 233},
          {"third_type": "前端架构", "count": 233},
          {"third_type": "TypeScript", "count": 233},
          {"third_type": "Vue2", "count": 233},
          {"third_type": "组件库", "count": 233},
        ],
      },
      {
        "second_type": "算法题",
        "count": 233,
        "children": [
          {"third_type": "数组", "count": 233},
          {"third_type": "链表", "count": 233},
          {"third_type": "堆栈", "count": 233},
          {"third_type": "队列", "count": 233},
          {"third_type": "哈希表", "count": 233},
          {"third_type": "字符串", "count": 233},
          {"third_type": "树", "count": 233},
          {"third_type": "图", "count": 233},
          {"third_type": "动态规划", "count": 233},
        ],
      },
      {
        "second_type": "Java",
        "count": 233,
        "children": [
          {"third_type": "Java基础", "count": 233},
          {"third_type": "JVM虚拟机", "count": 233},
          {"third_type": "Spring", "count": 233},
          {"third_type": "IO", "count": 233},
          {"third_type": "业务场景", "count": 233},
          {"third_type": "多线程", "count": 233},
          {"third_type": "分布式", "count": 233},
          {"third_type": "微服务", "count": 233},
        ],
      },
      {
        "second_type": "C++",
        "count": 233,
        "children": [
          {"third_type": "语言特性", "count": 233},
          {"third_type": "STL容器", "count": 233},
          {"third_type": "数据结构", "count": 233},
          {"third_type": "编译原理", "count": 233},
          {"third_type": "内存", "count": 233},
        ],
      },
      {
        "second_type": "Go",
        "count": 233,
        "children": [
          {"third_type": "语言特性", "count": 233},
          {"third_type": "Gin框架", "count": 233},
          {"third_type": "垃圾回收", "count": 233},
          {"third_type": "底层实现", "count": 233},
          {"third_type": "消息队列", "count": 233},
          {"third_type": "分布式", "count": 233},
        ],
      },
      {
        "second_type": "NLP",
        "count": 233,
        "children": [
          {"third_type": "分词", "count": 233},
          {"third_type": "文本分类", "count": 233},
          {"third_type": "序列标注", "count": 233},
          {"third_type": "对话系统", "count": 233},
          {"third_type": "主题模型", "count": 233},
          {"third_type": "知识图谱", "count": 233},
          {"third_type": "提示学习", "count": 233},
          {"third_type": "图神经网络", "count": 233},
          {"third_type": "句嵌入", "count": 233},
        ],
      },
      {
        "second_type": "Python",
        "count": 233,
        "children": [
          {"third_type": "环境准备", "count": 233},
          {"third_type": "语言特性", "count": 233},
          {"third_type": "Python基础", "count": 233},
          {"third_type": "Flask", "count": 233},
          {"third_type": "Django", "count": 233},
          {"third_type": "爬虫", "count": 233},
          {"third_type": "可视化", "count": 233},
        ],
      },
      {
        "second_type": "微服务",
        "count": 233,
        "children": [
          {"third_type": "微服务架构", "count": 233},
          {"third_type": "Zookeeper", "count": 233},
          {"third_type": "服务调用", "count": 233},
          {"third_type": "熔断", "count": 233},
          {"third_type": "负载均衡", "count": 233},
          {"third_type": "全链路跟踪", "count": 233},
        ],
      },
      {
        "second_type": "数据库",
        "count": 233,
        "children": [
          {"third_type": "SQL语句", "count": 233},
          {"third_type": "存储底层", "count": 233},
          {"third_type": "性能优化", "count": 233},
          {"third_type": "索引", "count": 233},
          {"third_type": "事务", "count": 233},
          {"third_type": "日志", "count": 233},
          {"third_type": "NoSQL", "count": 233},
          {"third_type": "分布式DB", "count": 233},
        ],
      },
      {
        "second_type": "网络基础",
        "count": 233,
        "children": [
          {"third_type": "经典面试题", "count": 233},
          {"third_type": "TCP协议", "count": 233},
          {"third_type": "UDP协议", "count": 233},
          {"third_type": "Socket", "count": 233},
          {"third_type": "HTTP协议", "count": 233},
          {"third_type": "TCP·IP模型", "count": 233},
          {"third_type": "IP地址", "count": 233},
          {"third_type": "网络安全", "count": 233},
        ],
      },
      {
        "second_type": "编译原理",
        "count": 233,
        "children": [
          {"third_type": "语法分析", "count": 233},
          {"third_type": "抽象语法树", "count": 233},
          {"third_type": "代码生成器", "count": 233},
          {"third_type": "垃圾回收器", "count": 233},
          {"third_type": "性能优化", "count": 233},
          {"third_type": "底层实现", "count": 233},
        ],
      },
      {
        "second_type": "Linux",
        "count": 233,
        "children": [
          {"third_type": "Vim", "count": 233},
          {"third_type": "SSH", "count": 233},
          {"third_type": "常用命令", "count": 233},
          {"third_type": "内核", "count": 233},
          {"third_type": "设计思想", "count": 233},
          {"third_type": "运维", "count": 233},
        ],
      },
      {
        "second_type": "操作系统",
        "count": 233,
        "children": [
          {"third_type": "进程·线程", "count": 233},
          {"third_type": "内存管理", "count": 233},
          {"third_type": "进程调度", "count": 233},
          {"third_type": "文件系统", "count": 233},
          {"third_type": "IO设备", "count": 233},
        ],
      },
      {
        "second_type": "机器学习",
        "count": 233,
        "children": [
          {"third_type": "数学相关", "count": 233},
          {"third_type": "分类", "count": 233},
          {"third_type": "预测", "count": 233},
          {"third_type": "常用模型", "count": 233},
          {"third_type": "数据预处理", "count": 233},
          {"third_type": "特征工程", "count": 233},
          {"third_type": "示例", "count": 233},
        ],
      },
      {
        "second_type": "软件测试",
        "count": 233,
        "children": [
          {"third_type": "基础知识", "count": 233},
          {"third_type": "功能测试", "count": 233},
          {"third_type": "Python框架", "count": 233},
          {"third_type": "UI自动化", "count": 233},
          {"third_type": "接口自动化", "count": 233},
          {"third_type": "性能测试", "count": 233},
        ],
      },
      {
        "second_type": "数据分析",
        "count": 233,
        "children": [
          {"third_type": "经典面试题", "count": 233},
          {"third_type": "数据可视化", "count": 233},
          {"third_type": "数学", "count": 233},
          {"third_type": "数据挖掘", "count": 233},
          {"third_type": "实战案例", "count": 233},
          {"third_type": "Excel", "count": 233},
          {"third_type": "分析方法", "count": 233},
        ],
      },
      {
        "second_type": "深度学习",
        "count": 233,
        "children": [
          {"third_type": "深度学习基础", "count": 233},
          {"third_type": "大模型", "count": 233},
          {"third_type": "多模态", "count": 233},
          {"third_type": "调参和优化", "count": 233},
          {"third_type": "Transformer", "count": 233},
          {"third_type": "工程实践", "count": 233},
          {"third_type": "卷积神经网络", "count": 233},
          {"third_type": "序列模型", "count": 233},
          {"third_type": "强化学习", "count": 233},
          {"third_type": "实际案例", "count": 233},
        ],
      },
      {
        "second_type": "Redis",
        "count": 233,
        "children": [
          {"third_type": "经典面试题", "count": 233},
          {"third_type": "持久化", "count": 233},
          {"third_type": "集群", "count": 233},
          {"third_type": "底层算法", "count": 233},
          {"third_type": "实际案例", "count": 233},
        ],
      },
      {
        "second_type": "消息队列",
        "count": 233,
        "children": [
          {"third_type": "经典面试题", "count": 233},
          {"third_type": "RabbitMQ", "count": 233},
          {"third_type": "RocketMQ", "count": 233},
          {"third_type": "Kafka", "count": 233},
          {"third_type": "实际案例", "count": 233},
        ],
      },
      {
        "second_type": "网络安全",
        "count": 233,
        "children": [
          {"third_type": "经典面试题", "count": 233},
          {"third_type": "Web", "count": 233},
          {"third_type": "数据库", "count": 233},
          {"third_type": "业务场景", "count": 233},
          {"third_type": "协议漏洞", "count": 233},
          {"third_type": "App安全", "count": 233},
          {"third_type": "密码学", "count": 233},
        ],
      },
      {
        "second_type": "设计模式",
        "count": 233,
        "children": [
          {"third_type": "六大原则", "count": 233},
          {"third_type": "单例模式", "count": 233},
          {"third_type": "工厂模式", "count": 233},
          {"third_type": "代理模式", "count": 233},
          {"third_type": "建造者模式", "count": 233},
          {"third_type": "模板方法模式", "count": 233},
          {"third_type": "原型模式", "count": 233},
          {"third_type": "策略模式", "count": 233},
          {"third_type": "观察者模式", "count": 233},
        ],
      },
      {
        "second_type": "RPC",
        "count": 233,
        "children": [
          {"third_type": "经典面试题", "count": 233},
          {"third_type": "主流RPC框架", "count": 233},
        ],
      },
      {
        "second_type": "Elastic",
        "count": 233,
        "children": [
          {"third_type": "经典面试题", "count": 233},
          {"third_type": "性能调优", "count": 233},
          {"third_type": "运行原理", "count": 233},
          {"third_type": "实际案例", "count": 233},
        ],
      },
      {
        "second_type": "MongoDB",
        "count": 233,
        "children": [
          {"third_type": "经典面试题", "count": 233},
          {"third_type": "底层原理", "count": 233},
          {"third_type": "理论知识", "count": 233},
          {"third_type": "实际案例", "count": 233},
        ],
      },
      {
        "second_type": "DevOps",
        "count": 233,
        "children": [
          {"third_type": "经典面试题", "count": 233},
        ],
      },
      {
        "second_type": "Git",
        "count": 233,
        "children": [
          {"third_type": "经典面试题", "count": 233},
          {"third_type": "常用操作", "count": 233},
          {"third_type": "底层原理", "count": 233},
        ],
      },
    ],
  },
  {
    "first_type": "非技术",
    "children": [
      {
        "second_type": "产品经理",
        "count": 233,
        "children": [
          {"third_type": "个人情况", "count": 233},
          {"third_type": "个人经历", "count": 233},
          {"third_type": "岗位职责", "count": 233},
          {"third_type": "产品感", "count": 233},
          {"third_type": "产品素质", "count": 233},
          {"third_type": "商业模式", "count": 233},
        ],
      },
      {
        "second_type": "运营",
        "count": 233,
        "children": [
          {"third_type": "个人情况", "count": 233},
          {"third_type": "个人经历", "count": 233},
          {"third_type": "岗位职责", "count": 233},
          {"third_type": "涨粉模式", "count": 233},
          {"third_type": "项目计划", "count": 233},
          {"third_type": "产品感", "count": 233},
        ],
      },
      {
        "second_type": "人力资源",
        "count": 233,
        "children": [
          {"third_type": "个人情况", "count": 233},
          {"third_type": "个人经历", "count": 233},
          {"third_type": "岗位职责", "count": 233},
          {"third_type": "招聘相关", "count": 233},
          {"third_type": "逻辑能力", "count": 233},
          {"third_type": "抗压能力", "count": 233},
          {"third_type": "职业规划", "count": 233},
        ],
      },
      {
        "second_type": "市场营销",
        "count": 233,
        "children": [
          {"third_type": "个人情况", "count": 233},
          {"third_type": "个人经历", "count": 233},
          {"third_type": "岗位职责", "count": 233},
          {"third_type": "案例分析", "count": 233},
          {"third_type": "活动规划", "count": 233},
          {"third_type": "营销手段", "count": 233},
        ],
      },
      {
        "second_type": "公关",
        "count": 233,
        "children": [
          {"third_type": "个人情况", "count": 233},
          {"third_type": "个人经历", "count": 233},
          {"third_type": "岗位职责", "count": 233},
          {"third_type": "案例分析", "count": 233},
          {"third_type": "活动策划", "count": 233},
        ],
      },
    ],
  },
];
